from selenium.webdriver.common.by import By
class CampusInformationLocators():

    # 登录标签
    login_click = (By.XPATH, '//*[@id="nav-userinfo"]/li')
    username_loc = (By.XPATH, '//input[@placeholder="请输入用户名"]')
    password_loc = (By.XPATH, '//input[@placeholder="请输入密码"]')
    # 登录按钮
    loginsbt = (By.XPATH, '//button[@onclick="loginVerify(1)"]')
    # 我的工作台
    workbench_loc = (By.LINK_TEXT, '我的工作台')
    # 取消修改密码按钮
    cancel_password_change = (By.XPATH, '//div[@aria-label="修改密码"]/div[3]/span/button[1]')
    # 校园管理
    school_manage = (By.XPATH, '//main[@class="site-content"]/div/div[1]/div[1]/div[1]/div/div/div[13]/div[1]/div/div')
    # 校园资讯菜单
    campus_information = (By.XPATH, '//div[@class="site-sidebar__inner"]/ul/li[4]/span')

    # 名称查询输入框
    name_box = (By.CSS_SELECTOR, 'input[placeholder="请输入名称"]')

    # 第一条资讯删除按钮
    delete_inf1 = (By.XPATH, '//div[@class="el-card__body"]/div[2]/div[1]/div[3]/table/tbody/tr[1]/td[6]/div/button[3]/span')
    delete_inf2 = (By.XPATH, '//div[@class="el-card__body"]/div[2]/div[1]/div[3]/table/tbody/tr[2]/td[6]/div/button[3]/span')
    delete_ensure = (By.XPATH, '//div[@aria-label="系统提示"]/div/div[3]/button[2]/span')
    delete_cancel = (By.XPATH, '//div[@aria-label="系统提示"]/div/div[3]/button[1]/span')
    # 发布资讯
    release_information = (By.XPATH, '//main[@class="site-content"]/div[2]/div/div/div[1]/div/div[2]/span')
    # 新建图文
    new_graphic = (By.XPATH, '//ul[@x-placement="bottom-end"]/li[1]')

    # 资讯标题
    information_title = (By.CSS_SELECTOR, 'input[placeholder="请输入资讯标题"]')
    # frame
    frame = (By.XPATH, '//iframe[contains(@id,"ueditor_")]')
    # 资讯内容
    information_content = (By.XPATH, '//html[@class="view"]/body')
    # 资讯内容提示信息
    prompt = (By.XPATH, '//div[@class="el-form-item__error"]')
    # 上传封面
    input_file = (By.XPATH, '//div[@class="el-upload el-upload--text"]/input')
    # 资讯关键字
    information_keywords = (By.XPATH, '//div[@class="el-form-item el-form-item--medium"][1]/div/div/input')
    # 是否置顶
    top_place = (By.XPATH, '//div[@class="el-card__body"]/form/div[5]/div/label[1]/span[1]/span')
    down_place = (By.XPATH, '//div[@class="el-card__body"]/form/div[5]/div/label[1]/span[2]/span')
    # 提交
    submit = (By.XPATH, '//div[@class="el-card__body"]/form/div[6]/div/button[1]/span')
    # 取消
    cancel = (By.XPATH, '//div[@class="el-card__body"]/form/div[6]/div/button[2]/span')
    ele2 = (By.XPATH, '//div[@role="alert"]/p')


    # 转载文章
    article_reprinted = (By.XPATH, '//ul[@x-placement="bottom-end"]/li[2]')
    # 资讯链接
    information_link = (By.CSS_SELECTOR, 'input[placeholder="请输入链接地址"]')
    preview = (By.XPATH, '//span[text()="预览"]')
    # 点击预览后的iframe
    iframe = (By.CSS_SELECTOR, 'iframe[id="newsFrame"]')
    # 有道翻译a标签 同传
    transfer = (By.XPATH, '//a[text()="同传"]')

    # 班级资讯首页列表第一个编辑栏
    editor1 = (By.XPATH, '//div[@class="el-card__body"]/div[2]/div[1]/div[3]/table/tbody/tr[1]/td[6]/div/button[2]/span')
    # 编辑页资讯标题
    title = (By.XPATH, '//div[@class="el-card__body"]/form/div[1]/div/div/input')
    # 编辑页提交按钮
    submit2 = [By.XPATH, '//div[@class="el-card__body"]/form/div[6]/div/button[1]/span']
    # 编辑页取消按钮
    cancel2 = [By.XPATH, '//div[@class="el-card__body"]/form/div[6]/div/button[2]/span']

    # 查询后列表第一个文章标题栏
    article_title = (By.XPATH, '//table[@class="el-table__body"]/tbody/tr/td[2]/div')
    # 暂无数据
    no_data = (By.XPATH, '//span[@class="el-table__empty-text"]')